<template>
	<!-- 钱包卡片 -->
	<view class="sh-wallet-box u-flex u-m-b-10 u-p-r-20">
		<image class="wallet-bg" src="/static/images/wallet-bg.png" mode="widthFix" />
		<view class="u-flex wallet-left">
			<view class="wallet-item u-flex-col u-col-center">
				<text
					class="wallet-item__detail item-balance u-ellipsis-1">{{ userInfo.release_money || '0.00' }}</text>
				<text class="wallet-item__title">待释放金额</text>
			</view>
			<view class="wallet-item u-flex-col u-col-center" @tap="jump('/pages/user/wallet/score-balance')">
				<text class="wallet-item__detail item-score u-ellipsis-1">{{ userInfo.score || "0" }}</text>
				<text class="wallet-item__title">积分</text>
			</view>
			<view class="wallet-item u-flex-col u-col-center" @tap="jump('/pages/user/wallet/index')">
				<text class="wallet-item__detail item-coupon u-ellipsis-1">{{ userInfo.money || "0" }}</text>
				<text class="wallet-item__title">金额</text>
			</view>
		</view>
		<view class="wallet-item u-flex-col wallet-right u-col-center" @tap="jump('/pages/user/wallet/index')">
			<button class="u-reset-button withdraw-btn" @tap="$Router.push('/pages/user/wallet/withdraw')">提现</button>
		</view>
	</view>
</template>

<script>
	/**
	 * 钱包样式卡片
	 */
	import {
		mapMutations,
		mapActions,
		mapState,
		mapGetters
	} from "vuex";
	export default {
		components: {},
		data() {
			return {
				commissionWallet: null,
			};
		},
		computed: {
			...mapGetters(["userInfo", "agentInfo", "userOtherData"]),
		},
		created() {},
		methods: {
			jump(path, query) {
				this.$Router.push({
					path: path,
					query: query,
				});
			},
		},
	};
</script>

<style lang="scss">
	// 钱包卡片
	.sh-wallet-box {
		position: relative;
		height: 142rpx;
		position: relative;

		.wallet-left {
			flex: 4;
			z-index: 1;
		}

		.wallet-right {
			position: relative;

			.cut-off--line {
				position: absolute;
				top: 50%;
				transform: translateY(-50%);
				right: (750rpx/5) - 15rpx;
				width: 30rpx;
				height: 136rpx;
			}
		}

		.wallet-bg {
			position: absolute;
			width: 100%;
			height: 100%;
			top: 0;
			left: 0;
			z-index: 0;
		}

		.wallet-item {
			flex: 1;

			.wallet-img {
				width: 46rpx;
				height: 46rpx;
			}

			.wallet-item__detail {
				font-size: 36rpx;
				width: 180rpx;
				text-align: center;
				font-weight: 600;
				color: #f9dba8;
			}

			.wallet-item__title {
				font-size: 24rpx;
				font-weight: 400;
				color: rgba(255, 255, 255, 0.6);
				margin-top: 20rpx;
			}

			.withdraw-btn {
				width: 96rpx;
				height: 50rpx;
				line-height: 50rpx;
				background: #f2d19b;
				border-radius: 40rpx 40rpx 40rpx 40rpx;
				font-weight: 600;
				font-size: 24rpx;
				color: #292e2c;
			}

			// .item-balance::after {
			// 	content: '元';
			// 	font-size: 16rpx;
			// 	margin-left: 4rpx;
			// }
			// .item-score::after {
			// 	content: '个';
			// 	font-size: 14rpx;
			// 	margin-left: 4rpx;
			// }
			// .item-coupon::after {
			// 	content: '张';
			// 	font-size: 16rpx;
			// 	margin-left: 4rpx;
			// }
		}
	}
</style>
